﻿using System;
using System.Collections.Generic;

using System.Text;
using ITAP.ShprossesBuilder.Manipulation;

namespace ITAP.ShprossesBuilder.ShprossesPropertyGrid.ComponentsProxy
{
    public abstract class Proxy
    {
        protected MainControl mainControl;

        public Proxy(MainControl mainControl)
        {
            this.mainControl = mainControl;
        }

        protected void ExecutePropertyValueChangingCommand()
        {
            ICommand propertyValueChanged = new CommandPropertyGridValueChanged(mainControl.ModelControl);
            mainControl.Manipulator.StartExecute(propertyValueChanged);
            mainControl.Manipulator.Execute(propertyValueChanged);
            mainControl.Manipulator.EndExecute(propertyValueChanged);
        }
    }
}
